/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.yunhoo.govProcure.bean;

import com.ibatis.dao.client.DaoManager;
import com.yunhoo.base.model.Category;
import com.yunhoo.base.model.Department;
import com.yunhoo.base.model.FinancialProject;
import com.yunhoo.base.model.Organization;
import com.yunhoo.base.model.Person;
import com.yunhoo.checkFlow.db.dao.FlowInfoDao;
import com.yunhoo.govProcure.db.dao.ProcureExecEditDao;
import com.yunhoo.govProcure.db.dao.ProcurePlanEditDao;
import com.yunhoo.govProcure.model.CateEditBase;
import com.yunhoo.govProcure.model.CateEditDetail;
import com.yunhoo.govProcure.model.ExecuteAppend;
import com.yunhoo.sys.db.config.DaoConfig;
import com.yunhoo.sys.util.common.CommonParam;
import com.yunhoo.sys.util.common.LoginParam;
import com.yunhoo.sys.util.common.Null;
import com.yunhoo.sys.util.common.ToolKit;
import java.io.Serializable;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
import javax.faces.model.SelectItem;

@ManagedBean(name = "executEditBean")
@SessionScoped
public class ProcureExecEditBean implements Serializable {

    private static DaoManager daom = null;
    private static ProcureExecEditDao execEditDao = null;
    private static ProcurePlanEditDao planEditDao = null;
    private static FlowInfoDao flowInfoDao = null;
    //
    private Organization org = null;
    private Integer iyear = 0;
    private List<Integer> yearli = CommonParam.yearListOfInteger();
    private List<SelectItem> selectNameli;
    private List<SelectItem> sessionli = null;
    private Integer isession = 0;
    private Integer isessionFor = 0;
    //
    private CateEditBase base = null;
    private CateEditDetail detail = null;
    private List<CateEditDetail> detailli = new ArrayList<CateEditDetail>();
    private DataModel<CateEditDetail> detailModel = new ListDataModel<CateEditDetail>();
    //
    private boolean addOrUpdate = false;
    private boolean editStatus = false;
    private boolean newBase = false;
    private boolean forButton = false;
    private boolean editAppend = false;
    //
    private List<FinancialProject> projList = new ArrayList<FinancialProject>();
    private DataModel<FinancialProject> projModel = new ListDataModel<FinancialProject>();
    private String quality = "";//采购预算资金性质
    private Category cate = new Category();
    private List<String> itemli = new ArrayList<String>();
    private List<CateEditDetail> planli = new ArrayList<CateEditDetail>();
    private DataModel<CateEditDetail> planModel = new ListDataModel<CateEditDetail>();
    //
    private boolean all = false;
    private boolean planall = false;
    private List<CateEditDetail> addli = new ArrayList<CateEditDetail>();
    private DataModel<CateEditDetail> addliModel = new ListDataModel<CateEditDetail>();
    private List<CateEditDetail> initPlanli = new ArrayList<CateEditDetail>();
    private boolean detailStatus = false;
    private List<CateEditDetail> list = new ArrayList<CateEditDetail>();
    private ExecuteAppend exappend = new ExecuteAppend();

    public ProcureExecEditBean() {
        daom = DaoConfig.getDaoManager();
        execEditDao = (ProcureExecEditDao) daom.getDao(ProcureExecEditDao.class);
        planEditDao = (ProcurePlanEditDao) daom.getDao(ProcurePlanEditDao.class);
        flowInfoDao = (FlowInfoDao) daom.getDao(FlowInfoDao.class);
    }

    public void yearChange() {
        initSession();
    }

    private void initSession() {
        Calendar calendar = Calendar.getInstance();
        int sysYear = calendar.get(Calendar.YEAR);
        int sysMonther = calendar.get(Calendar.MONTH) + 1;
        System.out.println("sysYear : " + sysYear);
        if (iyear > sysYear) {
            System.out.println("系统时间错误！");
            isessionFor = 0;
        } else if (iyear < sysYear) {
            isessionFor = 4;
            System.out.println("iyear < sysYear");
        } else if (iyear == sysYear) {
            Integer imonth = sysMonther;
            System.out.println("imonth:" + imonth);
            if (imonth >= 1 && imonth <= 3) {
                isessionFor = 1;
            } else if (imonth >= 4 && imonth <= 6) {
                isessionFor = 2;
            } else if (imonth >= 7 && imonth <= 9) {
                isessionFor = 3;
            } else if (imonth >= 10 && imonth <= 12) {
                isessionFor = 4;
            }
        }
    }

    private void initStatus() {
        addOrUpdate = false;
        editStatus = false;
    }

    public void initPlanLi() {
        initPlanli.clear();

        CateEditBase param = new CateEditBase(true);
        param.setIyear(iyear);
        param.setImonth(isession);
        param.setDeptCode(getCurDept().getCode().trim());
        param.setEditPerCode(getCurPer().getCpsn_number().trim());
        List<CateEditBase> planbaseLi = planEditDao.queryListCateEditBaseByDeptAndPerson(param);
        System.out.println("planbaseli size : " + planbaseLi.size());
        if (!Null.check(planbaseLi)) {
            for (CateEditBase planbase : planbaseLi) {
                System.out.println("planbase.getNumber().trim() : " + planbase.getNumber().trim());
                CateEditDetail param1 = new CateEditDetail();
                param1.setOrgCode(LoginParam.getOrg().getCode());
                param1.setIyear(iyear);
                param1.setNumber(planbase.getNumber().trim());
                param1.setQuality(quality);
                param1.setStatus("3");
                List<CateEditDetail> initPlanlist = planEditDao.queryListCateEditDetailByNumber(param1);
                initPlanli.addAll(initPlanlist);
            }

            System.out.println("planli34:" + initPlanli.size());
        }
    }

    public void queryList() {
        newBase = false;
        if (Null.check(iyear)) {
            ToolKit.msgs_err("请选择年度!");
        } else if (Null.check(isession)) {
            ToolKit.msgs_err("请选择季度!");
        } else if (Null.check(quality)) {
            ToolKit.msgs_err("请选择采购预算资金性质!");
        } else {
            initList();
            initStatus();
        }
    }

    public void query() {
        addli.clear();
        newBase = false;
        if (Null.check(iyear)) {
            ToolKit.msgs_err("请选择年度!");
        } else if (Null.check(isession)) {
            ToolKit.msgs_err("请选择季度!");
        } else if (Null.check(quality)) {
            ToolKit.msgs_err("请选择采购预算资金性质!");
        } else {
            initList();
            initPlanLi();
            initStatus();
            forButton = true;
        }
    }

    public void initList() {
        try {
            //          Map map = new HashMap();
            //map.put("orgCode", getCurOrg().getCode().trim());
//            map.put("iyear", iyear);
//            map.put("imonth", isession);
//            map.put("deptCode", getCurDept().getCode().trim());
//            map.put("perNumber", getCurPer().getCpsn_number().trim());
//            base = (CateEditBase) dao.query(map, "executEditGov");

            CateEditBase param = new CateEditBase(true);
            param.setOrgCode(LoginParam.getOrg().getCode());
            param.setIyear(iyear);
            param.setImonth(isession);
            param.setDeptCode(LoginParam.getDept().getCode());
            param.setEditPerCode(LoginParam.getPer().getCpsn_number());
            base = execEditDao.queryCateBase(param);

            System.out.println("base : " + base);
            if (base != null) {
                System.out.println("base not null : " + base.getNumber());
            } else {
                System.out.println("base is null ");
            }

            detailli = new ArrayList<CateEditDetail>();
            if (base != null) {
//                System.out.println("base1:" + base.getNumber());
//                map.put("number", base.getNumber());
//                map.put("quality", quality);
//                detailli = dao.queryList(map, "executEditGov");

                CateEditDetail param1 = new CateEditDetail();
                param1.setOrgCode(LoginParam.getOrg().getCode());
                param1.setIyear(iyear);
                param1.setNumber(base.getNumber());
                param1.setQuality(quality);
                detailli = execEditDao.queryListCateDetailByNumber(param1);
                System.out.println("detailli1:" + detailli.size());

            } else {
                String curSession = iyear + "0" + isession;
                newBase = true;
                base = new CateEditBase();
                base.setOrgCode(LoginParam.getOrg().getCode());
                base.setIyear(iyear);
                base.setNumber(maxCode());
                //base.setOrg(getCurOrg());
                base.setDeptCode(getCurDept().getCode());
                base.setDataPeriod(curSession);
                base.setEditPerCode(getCurPer().getCpsn_number());
                base.setEditDate(new Date());
            }
        } finally {
            daom.endTransaction();
        }
        detailModel.setWrappedData(detailli);
    }

    public void queryPlanLi() {
        planli.clear();
        CateEditBase param = new CateEditBase(true);
        param.setOrgCode(LoginParam.getOrg().getCode());
        param.setImonth(isession);
        param.setIyear(iyear);
        param.setDeptCode(getCurDept().getCode());
        param.setEditPerCode(getCurPer().getCpsn_number());
        List<CateEditBase> planbaseli = planEditDao.queryListCateEditBaseByDeptAndPerson(param);
        if (!Null.check(planbaseli)) {
            for (CateEditBase planbase : planbaseli) {
//                map.put("number", planbase.getNumber());
//                map.put("quality", quality);
//                map.put("status", "3");
//                List<CateEditDetail> planlist = dao.queryList02(map, "planEditGov");
//

                CateEditDetail param1 = new CateEditDetail();
                param1.setOrgCode(LoginParam.getOrg().getCode());
                param1.setIyear(iyear);
                param1.setNumber(planbase.getNumber());
                param1.setQuality(quality);
                param1.setStatus("3");
                List<CateEditDetail> planlist = planEditDao.queryListCateEditDetailByNumber(param1);
                planli.addAll(planlist);
            }
            List<CateEditDetail> listd = new ArrayList<CateEditDetail>();
            System.out.println("planli1:" + planli.size());
            if (!Null.check(detailli)) {
                for (CateEditDetail det : detailli) {
                    for (CateEditDetail li : planli) {
                        if (det.getpId() == li.getpId()) {
                            listd.add(li);
                        }
                    }
                }
            }
            planli.removeAll(listd);
            System.out.println("planli:" + planli.size());
        }
        planModel.setWrappedData(planli);
    }

    public void add() {
        if (Null.check(iyear) || Null.check(quality)) {
            ToolKit.msgs_err("请先选择点击查询!");
        } else {
            queryPlanLi();
            if (!Null.check(planli)) {
                addOrUpdate = true;
                editStatus = true;
            }
            initList();
        }
    }

    public void update() {
        for (CateEditDetail d : detailli) {
            if (d.isSelected() == true) {
                if (d.getStatus().equals("0") || d.getStatus().equals("2")) {
                    addOrUpdate = false;
                    editStatus = true;
                }
            }
        }
    }

    public void delete() throws SQLException {
        try {
            for (CateEditDetail d : detailli) {
                if (d.isSelected() == true) {
                    if (d.getStatus().equals("0") || d.getStatus().equals("2")) {
                        daom.startTransaction();
//                        dao.delete(d, "executEditGov");
//                        dao.delete01(d.getAnumber().trim(), "executEditGov");
                        execEditDao.deleteExecDetail(d);
                        ExecuteAppend param = new ExecuteAppend(true);
                        param.setAnumber(d.getAnumber());
                        execEditDao.deleteExecuteAppend(param);
                        daom.commitTransaction();
                        ToolKit.msgs_err("删除成功!");
                    } else {
                        ToolKit.msgs_err("已提交以及审核通过的不能删除，请重新选择！");
                    }
                }
            }
        } finally {
            daom.endTransaction();
        }
        queryList();
        initStatus();
    }
    //附加备注信息

    public void addExeAppend() {
        exappend = addliModel.getRowData().getApp();
    }

    public void updateExeAppend() {
        editAppend = true;
        // exappend = (ExecuteAppend) dao.query03(detailModel.getRowData().getAnumber().trim(), "executEditGov");

        ExecuteAppend param = new ExecuteAppend(true);
        param.setAnumber(detailModel.getRowData().getAnumber().trim());
        exappend = execEditDao.queryExecuteAppend(param);

        System.out.println("editStatus@@@" + editStatus);
    }

    public void saveExeAppend() throws SQLException {
        //dao.update04(exappend, "executEditGov");
        execEditDao.updateExecuteAppend(exappend);
        queryList();
        initStatus();
    }

    public void selectExeAppend() {
        editAppend = false;
        // exappend = (ExecuteAppend) dao.query03(detailModel.getRowData().getAnumber().trim(), "executEditGov");        

        ExecuteAppend param = new ExecuteAppend(true);
        param.setAnumber(detailModel.getRowData().getAnumber().trim());
        exappend = execEditDao.queryExecuteAppend(param);
        System.out.println(detailModel.getRowData().getAnumber().trim());
        System.out.println("editStatus@@@33" + editStatus);
    }

    public void save() throws SQLException {
        if (!newBase) {
            if (addOrUpdate) {
                checkFor(addli);
                System.out.println("detailStatus1:" + detailStatus);
                if (!Null.check(list) && detailStatus == false) {
                    for (CateEditDetail a : list) {
                        a.setNumber(base.getNumber());
                        a.setCheckNumber("");
                        a.setEditDate(new Date());
                        a.setAnumber(maxAnumber());
                        if (Null.check(a.getProject().getFinCode())) {
                            a.getProject().setFinCode("");
                        }
                        if (!"0".equals(a.getStatus())) {
                            a.setStatus("0");
                        }
                        daom.startTransaction();
                        //dao.insert(a, "executEditGov");
                        execEditDao.insertExecDetail(a);
                        if (quality.equals("1")) {
                            //dao.update(a, "executEditGov");
                            execEditDao.updateExecDetail(a);
                        }
                        if (quality.equals("0")) {
                            //dao.update01(a, "executEditGov");
                            a.setProjCode("");
                            execEditDao.updateExecDetail(a);
                        }
                        a.getApp().setAnumber(maxAnumber());
                        //dao.insert02(a.getApp(), "executEditGov");
                        execEditDao.insertExecuteAppend(a.getApp());
                        daom.commitTransaction();
                    }
                    queryList();
                    initStatus();
                    addli = new ArrayList<CateEditDetail>();
                    addliModel.setWrappedData(addli);
                    System.out.println("1******:!!!");
                }
            } else {
                checkFor(detailli);
                System.out.println("detailStatus2:" + detailStatus);
                if (!Null.check(list) && detailStatus == false) {
                    for (CateEditDetail c : list) {
                        c.setEditDate(new Date());
                        daom.startTransaction();
                        if (quality.equals("1")) {
                            //dao.update(c, "executEditGov");
                            execEditDao.updateExecDetail(c);
                        }
                        if (quality.equals("0")) {
                            //dao.update01(c, "executEditGov");
                            c.setProjCode("");
                            execEditDao.updateExecDetail(c);
                        }
                        //c.getApp().setAnumber(c.getAnumber().trim());
                        //dao.update04(c.getApp(), "executEditGov");
                        daom.commitTransaction();
                    }
                    queryList();
                    initStatus();
                    System.out.println("2******:!!!");
                }
                if (Null.check(list) && detailStatus == false) {
                    ToolKit.msgs_err("没有选择保存的内容，请重新修改保存!");
                    queryList();
                    initStatus();
                }
            }
        } else if (newBase) {
            try {
                checkFor(addli);
                System.out.println("detailStatus3:" + detailStatus);
                if (!Null.check(list) && detailStatus == false) {
                    daom.startTransaction();
                    //dao.insert01(base, "executEditGov");
                    execEditDao.insertExecBase(base);
                    for (CateEditDetail a : list) {
                        a.setNumber(base.getNumber());
                        a.setCheckNumber("");
                        a.setEditDate(new Date());
                        a.setAnumber(maxAnumber());
                        if (Null.check(a.getProjCode())) {
                            a.setProjCode("");
                        }
                        if (!"0".equals(a.getStatus())) {
                            a.setStatus("0");
                        }
                        daom.startTransaction();
                        //dao.insert(a, "executEditGov");
                        execEditDao.insertExecDetail(a);
                        if (quality.equals("1")) {
                            //dao.update(a, "executEditGov");
                            execEditDao.updateExecDetail(a);
                        }
                        if (quality.equals("0")) {
                            //dao.update01(a, "executEditGov");
                            a.setProjCode("");
                            execEditDao.updateExecDetail(a);
                        }
                        a.getApp().setAnumber(maxAnumber());
                        //dao.insert02(a.getApp(), "executEditGov");
                        execEditDao.insertExecuteAppend(a.getApp());
                        daom.commitTransaction();
                    }
                    queryList();
                    initStatus();
                    addli = new ArrayList<CateEditDetail>();
                    addliModel.setWrappedData(addli);
                    System.out.println("3******:!!!");
                }
            } finally {
                daom.endTransaction();
            }
            newBase = false;
        }
    }

    public void checkFor(List<CateEditDetail> li) {
        detailStatus = false;
        list = new ArrayList<CateEditDetail>();
        for (CateEditDetail plan : initPlanli) {
            for (CateEditDetail d : li) {
                if (d.isSelected() == true) {
                    if (plan.getpId() == d.getpId()) {
                        if (d.getCate().getCount() > plan.getCate().getCount()) {
                            ToolKit.msgs_err("计划数量不得大余预算数量!");
                            detailStatus = true;
                            break;
                        } else if (d.getFinancial() > plan.getFinancial()) {
                            ToolKit.msgs_err("计划财政性资金不得大余预算财政性资金!");
                            detailStatus = true;
                            break;
                        } else if (d.getOther() > plan.getOther()) {
                            ToolKit.msgs_err("计划其他资金不得大余预算其他资金!");
                            detailStatus = true;
                            break;
                        } else {
                            list.add(d);
                        }
                    }
                }
            }
        }
        System.out.println("list@@@:" + list.size());
    }

    public void selectdAll() {
        List<CateEditDetail> temp = (ArrayList) planModel.getWrappedData();
        List<CateEditDetail> planlist = new ArrayList<CateEditDetail>();
        if (temp != null && temp.size() > 0) {
            for (CateEditDetail l : temp) {
                l.setSelected(planall);
                planlist.add(l);
            }
            planModel.setWrappedData(planlist);
        }
    }

    public void selectdAllDetail() {
        List<CateEditDetail> temp = (ArrayList) detailModel.getWrappedData();
        List<CateEditDetail> dlist = new ArrayList<CateEditDetail>();
        if (temp != null && temp.size() > 0) {
            for (CateEditDetail l : temp) {
                l.setSelected(all);
                dlist.add(l);
            }
            detailModel.setWrappedData(dlist);
        }
    }

    public void addForPlan() {
        addli.clear();
        List<CateEditDetail> li = (ArrayList) planModel.getWrappedData();
        for (CateEditDetail c : li) {
            if (c.isSelected() == true) {
                addli.add(c);
            }
        }
        if (Null.check(addli)) {
            initStatus();
        }
        addliModel.setWrappedData(addli);
    }

    public void submitFor() throws SQLException {
        for (CateEditDetail d : detailli) {
            if (d.isSelected() == true) {
                System.out.println("selected - " + d.getCateCode());
                if (!("0".equals(d.getStatus()) || "2".equals(d.getStatus()))) {
                    /*
                     * 0：未提交 2：退回修改
                     * 其他状态 跳过
                     */
                    continue;
                }
                System.out.println("update true ");
                d.setStatus("1");
                d.setCheckNumber("");
                execEditDao.updateExecDetail(d);
                ToolKit.msgs_err("提交完成!");
            }
        }
        queryList();
        initStatus();
    }

    public void canclFor() throws SQLException {
        for (CateEditDetail d : detailli) {
            if (d.isSelected() == true) {
                if (!"1".equals(d.getStatus())) {
                    /*
                     * 非提交状态的 跳过
                     */
                    continue;
                }
                d.setStatus("0");
                execEditDao.updateExecDetail(d);
                ToolKit.msgs_err("撤单成功!");
            }
        }
        queryList();
        //editStatus = true;
        initStatus();
    }

    public void changeListener() {
        forButton = false;
        ToolKit.msgs_err("请单击查询");
    }

    private Person getCurPer() {
        return LoginParam.getPer();
    }

    private Department getCurDept() {
        return LoginParam.getDept();
    }

    private Date getLoginDate() {
        return LoginParam.getLoginDate();
    }

    private String maxCode() {
        //Integer maxCode = (Integer) dao.query01(null, "executEditGov");
        Integer maxCode = execEditDao.queryMaxNumberFromExecBase(new CateEditBase(true));
        if (maxCode == null) {
            maxCode = 0;
        }
        return String.format(iyear + "YS-%08d%n", maxCode + 1).trim();
    }

    public String maxAnumber() {
        //String maxCode = (String) dao.query02(null, "executEditGov");
        Integer maxCode = execEditDao.queryMaxNumberFromExecuteAppend(new ExecuteAppend(true));

        String str = String.format("%05d%n", (maxCode == null ? 0 : maxCode) + 1);
        return str.trim();
    }

    public static DaoManager getDaom() {
        return daom;
    }

    public static void setDaom(DaoManager daom) {
        ProcureExecEditBean.daom = daom;
    }

    public Organization getOrg() {
        return org;
    }

    public void setOrg(Organization org) {
        this.org = org;
    }

    public Integer getIyear() {
        return iyear;
    }

    public void setIyear(Integer iyear) {
        this.iyear = iyear;
    }

    public List<Integer> getYearli() {
        return yearli;
    }

    public void setYearli(List<Integer> yearli) {
        this.yearli = yearli;
    }

    public List<SelectItem> getSelectNameli() {
        return selectNameli;
    }

    public void setSelectNameli(List<SelectItem> selectNameli) {
        this.selectNameli = selectNameli;
    }

    public List<SelectItem> getSessionli() {
        return sessionli;
    }

    public void setSessionli(List<SelectItem> sessionli) {
        this.sessionli = sessionli;
    }

    public Integer getIsession() {
        return isession;
    }

    public void setIsession(Integer isession) {
        this.isession = isession;
    }

    public Integer getIsessionFor() {
        return isessionFor;
    }

    public void setIsessionFor(Integer isessionFor) {
        this.isessionFor = isessionFor;
    }

    public CateEditBase getBase() {
        return base;
    }

    public void setBase(CateEditBase base) {
        this.base = base;
    }

    public CateEditDetail getDetail() {
        return detail;
    }

    public void setDetail(CateEditDetail detail) {
        this.detail = detail;
    }

    public List<CateEditDetail> getDetailli() {
        return detailli;
    }

    public void setDetailli(List<CateEditDetail> detailli) {
        this.detailli = detailli;
    }

    public DataModel<CateEditDetail> getDetailModel() {
        return detailModel;
    }

    public void setDetailModel(DataModel<CateEditDetail> detailModel) {
        this.detailModel = detailModel;
    }

    public boolean isAddOrUpdate() {
        return addOrUpdate;
    }

    public void setAddOrUpdate(boolean addOrUpdate) {
        this.addOrUpdate = addOrUpdate;
    }

    public boolean isEditStatus() {
        return editStatus;
    }

    public void setEditStatus(boolean editStatus) {
        this.editStatus = editStatus;
    }

    public boolean isNewBase() {
        return newBase;
    }

    public void setNewBase(boolean newBase) {
        this.newBase = newBase;
    }

    public boolean isForButton() {
        return forButton;
    }

    public void setForButton(boolean forButton) {
        this.forButton = forButton;
    }

    public boolean isEditAppend() {
        return editAppend;
    }

    public void setEditAppend(boolean editAppend) {
        this.editAppend = editAppend;
    }

    public List<FinancialProject> getProjList() {
        return projList;
    }

    public void setProjList(List<FinancialProject> projList) {
        this.projList = projList;
    }

    public DataModel<FinancialProject> getProjModel() {
        return projModel;
    }

    public void setProjModel(DataModel<FinancialProject> projModel) {
        this.projModel = projModel;
    }

    public String getQuality() {
        return quality;
    }

    public void setQuality(String quality) {
        this.quality = quality;
    }

    public Category getCate() {
        return cate;
    }

    public void setCate(Category cate) {
        this.cate = cate;
    }

    public List<String> getItemli() {
        return itemli;
    }

    public void setItemli(List<String> itemli) {
        this.itemli = itemli;
    }

    public List<CateEditDetail> getPlanli() {
        return planli;
    }

    public void setPlanli(List<CateEditDetail> planli) {
        this.planli = planli;
    }

    public DataModel<CateEditDetail> getPlanModel() {
        return planModel;
    }

    public void setPlanModel(DataModel<CateEditDetail> planModel) {
        this.planModel = planModel;
    }

    public boolean isAll() {
        return all;
    }

    public void setAll(boolean all) {
        this.all = all;
    }

    public boolean isPlanall() {
        return planall;
    }

    public void setPlanall(boolean planall) {
        this.planall = planall;
    }

    public List<CateEditDetail> getAddli() {
        return addli;
    }

    public void setAddli(List<CateEditDetail> addli) {
        this.addli = addli;
    }

    public DataModel<CateEditDetail> getAddliModel() {
        return addliModel;
    }

    public void setAddliModel(DataModel<CateEditDetail> addliModel) {
        this.addliModel = addliModel;
    }

    public List<CateEditDetail> getInitPlanli() {
        return initPlanli;
    }

    public void setInitPlanli(List<CateEditDetail> initPlanli) {
        this.initPlanli = initPlanli;
    }

    public boolean isDetailStatus() {
        return detailStatus;
    }

    public void setDetailStatus(boolean detailStatus) {
        this.detailStatus = detailStatus;
    }

    public List<CateEditDetail> getList() {
        return list;
    }

    public void setList(List<CateEditDetail> list) {
        this.list = list;
    }

    public ExecuteAppend getExappend() {
        return exappend;
    }

    public void setExappend(ExecuteAppend exappend) {
        this.exappend = exappend;
    }
}
